<%--
  Created by IntelliJ IDEA.
  User: MySunshine
  Date: 2022/10/28
  Time: 17:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>推荐图书</title>

    <link rel="stylesheet" href="../../layui/css/layui.css">

    <style>
        *{
            margin: 0;
            text-align: center;
        }
        .box .goodsimg{
            width: 180px;
            height: 230px;
        }
        .box{
            width: 300px;
            height: 355px;
            display: inline-block;
            /*vertical-align: middle;*/
            padding: 20px;
        }
        .box p{
            /*统一商品描述内容所占高度，保持盒子之间的内容的整齐*/
            font-size: 30px;
            height: 30px;
        }

        .box p,span,del{
            color: rgba(247, 235, 6, 0.98);
        }
        .box .user{
            color: red;
            font-size:10px;
        }
        .monthSale{
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            float: right;
            font-size:2px;
        }
    </style>
</head>
<body>
<div class="layui-container">

    <c:forEach items="${sessionScope.book}" var="b">
        <div  class="box">
            <a target="_blank" href="${b.url}">
                <img class="goodsimg" src="${b.img}" alt=""> <br>
                <p> ${b.book} </p> <br>
                <span class="user">  作者: ${b.user} </span>
                <span class="monthSale"> ${b.synopsis} </span>

            </a>
        </div>

    </c:forEach>
</div>

</body>
</html>
